package com.cennavi.bigdata.baotou.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * Created by zuoweiguang on 2016/9/6.
 */
public class StarupListener implements ServletContextListener {

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
    }

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        //sce.getServletContext().log("启动线程池");
//        PoolManager.pool = Executors.newFixedThreadPool(10);
//        sce.getServletContext().log("启动定时器");
//        Timer timer = new Timer(true);

        // 每隔 1分钟 执行一次
//        timer.schedule(new TimerTask(sce.getServletContext(), "traffic", 0), 0, 1 * 60 * 1000);
//        sce.getServletContext().log("添加 [交通路况] 任务调度表");

    }

}
